module Base
{
	model Liaz300Truck_Base
	{
		mesh = vehicles/LIAZ300TRUCK_Body|Body,
		shader = vehicle_norandom_multiuv,
		invertX = FALSE,
		scale = 1,
	}
	model Liaz300Truck_Interior
	{
		mesh = vehicles/LIAZ300TRUCK_Body|LiazInterior,
		texture = Vehicles/LiazSemi_Interior,
		shader = vehiclewheel,
		scale = 1,
	}
	model Liaz300Truckfrontwheelleft
	{
		mesh = vehicles/LIAZ300TRUCK_Body|LiazWheel,
		texture = vehicles/Liaz300Fronttires,
		shader = vehiclewheel,
                invertX = TRUE,
	}
	model Liaz300Truckfrontwheelright
	{
		mesh = vehicles/LIAZ300TRUCK_Body|LiazWheel,
		texture = vehicles/Liaz300Fronttires,
		shader = vehiclewheel,
                invertX = TRUE,
	}
	model Liaz300Truckbackwheelleft
	{
		mesh = vehicles/LIAZ300TRUCK_Body|LiazWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = vehiclewheel,
	}
	model Liaz300Truckbackwheelright
	{
		mesh = vehicles/LIAZ300TRUCK_Body|LiazWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = vehiclewheel,
	}
	model Liaz300Truck_Battery
    {
        mesh = vehicles/LIAZ300TRUCK_Body|LiazBattery,
		texture = vehicles/LiazSemi_Interior,
        shader = vehiclewheel,
        scale = 1,
    }
	vehicle Liaz300Truck
	{
		mechanicType = 2,
		offRoadEfficiency = 0.85,
		engineRepairLevel = 4,
		playerDamageProtection = 1.5,
		engineRPMType = van,

		model
		{
			file = Liaz300Truck_Base,
			scale = 0.9400,
			offset = 0.0000 1.5319 2.3511,
		}

		part TCLConfig
		{
			category = nodisplay,

			table TCLConfig
			{
				airbrake = true,
				animType = vanilla,
			}
		}

		spawnOffsetY = 0,

		skin
		{
			texture = Vehicles/LiazTRUCK_White,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Blue,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Green,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Orange,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Red,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Purple,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_Yellow,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_WhiteBlueStripes,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_WhiteRedStripes,
		}

		skin
		{
			texture = Vehicles/LiazTRUCK_WhiteGreenStripes,
		}

		textureRust = Vehicles/LiazSemiRust,
		textureMask = Vehicles/LiazSpecialServiceMask,
		textureLights = Vehicles/LiazSemiSpecialServiceLights,
		textureDamage1Shell = Vehicles/LiazSemiDamage1,
		textureDamage2Shell = Vehicles/LiazSemiDamage2,
		textureDamage1Overlay = Vehicles/LiazSemiBlood,
		textureDamage2Overlay = Vehicles/LiazSemiBlood,

		sound
		{
			engine = VehicleEngineSUV,
			engineStart = VehicleEngineSUV,
			engineTurnOff = VehicleEngineSUV,
			horn = VehicleHornVan,
			ignitionFail = VehicleIgnitionFailSUV,
		}

		extents = 2.5319 1.9362 7.5106,
		mass = 750,
		physicsChassisShape = 2.5106 1.9362 7.5106,
		centerOfMassOffset = -0.0106 1.3404 0.1809,
		shadowExtents = 2.5355 8.3119,
		shadowOffset = -0.0078 0.1793,
		engineForce = 5150,
		maxSpeed = 65f,
		gearRatioCount = 4,
		engineLoudness = 120,
		engineQuality = 70,
		brakingForce = 50,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.65f,
		steeringIncrement = 0.04,
		steeringClamp = 0.25,
		suspensionStiffness = 41,
		suspensionCompression = 4.70,
		suspensionDamping = 3.75,
		maxSuspensionTravelCm = 14,
		suspensionRestLength = 0.15f,
		wheelFriction = 2.0f,
		frontEndHealth = 3250,
		rearEndHealth = 2200,
		seats = 2,

		wheel FrontLeft
		{
			front = true,
			offset = 1.0638 -1.0319 0.1809,
			radius = 0.48f,
			width = 0.3f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -1.0638 -1.0319 0.1809,
			radius = 0.48f,
			width = 0.3f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.8830 -1.0319 -4.4149,
			radius = 0.48f,
			width = 0.3f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.8830 -1.0319 -4.4149,
			radius = 0.48f,
			width = 0.3f,
		}

		template = PassengerSeat2,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,
			door = DoorFrontLeft,

			position inside
			{
				offset = 0.7234 0.1489 0.3723,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.4362 -0.5957 0.4894,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,
			door = DoorFrontRight,

			position inside
			{
				offset = -0.6809 0.1489 0.3723,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.5745 -0.5957 0.4894,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		area Engine
		{
			xywh = 1.5532 2.1170 0.5745 0.7021,
		}

		area TruckBed
		{
			xywh = -0.0106 -4.1383 2.5319 0.9362,
		}

		area SeatFrontLeft
		{
			xywh = 1.6702 3.1383 0.8085 1.0000,
		}

		area SeatFrontRight
		{
			xywh = -1.6702 3.1277 0.8085 1.0000,
		}

		area GasTank
		{
			xywh = -1.5106 1.7766 0.4894 0.4894,
		}

		area TireFrontLeft
		{
			xywh = 1.5106 3.3085 0.4894 0.4894,
		}

		area TireFrontRight
		{
			xywh = -1.5106 3.3298 0.4894 0.4894,
		}

		area TireRearLeft
		{
			xywh = 1.5106 -1.2447 0.4894 0.4894,
		}

		area TireRearRight
		{
			xywh = -1.5106 -1.2447 0.4894 0.4894,
		}

		part Seat*
		{
			table install
			{
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:2,
				recipes = Intermediate Mechanics,
			}
		}

		part GloveBox
		{
			model Liaz300Truck
			{
				file = Liaz300Truck_Interior,
			}

			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,

			container
			{
				capacity = 15,
				test = Vehicles.ContainerAccess.GloveBox,
			}

			lua
			{
				create = Vehicles.Create.Default,
			}
		}

		template = GasTank,

		part GasTank
		{
			area = GasTank,
			category = gastank,
			mechanicRequireKey = true,

			container
			{
				capacity = 100,
				test = Vehicles.ContainerAccess.GasTank,
				contentType = Gasoline,
				conditionAffectsCapacity = false,
			}

			lua
			{
				create = Vehicles.Create.GasTank,
				update = Vehicles.Update.GasTank,
				checkEngine = Vehicles.CheckEngine.GasTank,
			}

			install
			{
				recipes = Intermediate Mechanics,
			}

			uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Battery,

		part Battery
		{
			model LiazBatt
			{
				file = Liaz300Truck_Battery,
			}
		}

		template = Engine,
		template! = Liaz300Truck_accesories,
		template! = Liaz300Truck_seats,
		template! = Liaz300Truck_doors,
		template! = Liaz300Truck_windows,
		template! = Liaz300Truck_trunkdoor,
		template! = Liaz300Truck_trunks,
		template! = Liaz300Truck_TruckbedRoof,
		template! = Liaz300Truck_windshields,
		template! = Liaz300Truck_armor,
		template! = Liaz300Truck_bumpers,
		template = Muffler,

		part Muffler
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = EngineDoor,

		part EngineDoor
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		part Windshield*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = Liaz300Truckfrontwheelleft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = Liaz300Truckfrontwheelright,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = Liaz300Truckbackwheelleft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = Liaz300Truckbackwheelright,
			}
		}

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = TV,
		template = Counters/part/CounterFrontRight,
		template = Fridges/part/FridgeFrontRight,
		template = Radio,
		template = Headlight,

		physics box
		{
			offset = 0.0000 1.8723 2.8830,
			extents = 2.3511 2.0213 1.9468,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = -0.0213 -0.7021 -6.0426,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.7660 1.7234,
			rotate = 0.0000 0.0000 0.0000,
			updateconstraint = false,
		}
	}
}
